<div style="clear:both;height:5px;"></div>
<?php 
if(isset($_SESSION['config_template']))
{
	if($_SESSION['config_template']=='layoutmain_web1')
	{
		?>
		<div class="top_box"><span></span></div>
		<div class="box base-mini">
	    	<div class="head">
	            <h4 style="width:70%;float:left"><?php echo $title;?></h4>
	            
				<?php if(isset($permission) && $permission=="true")  {?>
				<div style="float: right;">
				<ul class="gallery clearfix">
					<a href="/supportonline/clickchange?iframe=true&width=370&height=230" rel="prettyPhoto[iframe]">
						<img src="/images/web1/Pencil.png" style="width:20px ; height:20px;"></img>
					</a>
				</ul>
				</div>
				<div style="float: right;margin-right:5px" >
						<!-- Tạo cây bút chì cho click and change -->
						<ul class="gallery clearfix">
							<a href="/supportonline/add?iframe=true&width=750&height=320" rel="prettyPhoto[iframe]">
								<img src="/images/button_add.png" style="width:20px ; height:20px;"></img>
							</a>
						</ul>
						<!-- End - Tạo cây bút chì cho click and change -->
				</div>
				<?php }?>
				</div>
			<div class="middle_box">
		            
					<div class="box_small_content" style="height:auto;">
					<?php foreach ($AllSupporter as $supporter){?>
						<div class="support_info">			
											<div style="width: 100%">
												<div style="float: left; width: 62%;font-size: 12px;color:gray; margin-left:10px; margin-top:5px;">
												<?php echo $supporter['support_position'];?>
												</div>
											<?php if(isset($permission) && $permission=="true")  {?>
											<div style="float: right; margin-right: 15px;">
												<!-- nut del -->						
													<input type="button" id="<?php echo $supporter["suppord_id"]?>" onclick="del(<?php echo $supporter["suppord_id"]?>);"  value="" style="background-image: url('/images/button_del.png'); border: none; width: 20px;height: 20px;"/>												
												<!-- end nut del -->
											</div>
											<div style="width: 20px; height:20px; float: right ;margin-right: 3px;">
				
				
												<!-- Tạo cây bút chì cho click and change -->
												<ul class="gallery clearfix">
										
													<a href="/supportonline/clickchangesupporter?sp_id=<?php echo $supporter["suppord_id"]?>&iframe=true&width=750&height=320&abc=<?php echo $supporter["suppord_id"]?>" rel="prettyPhoto[iframe]">
													<img src="/images/Pencil.png" style="width:17px ; height:17px;margin-top:2px"></img>
											
													</a>
												</ul>
			
											</div>
											<?php  }?>
											
											</div>
											<div style="width: 100%;clear: both;height:20px;">
												<div style="float:left;width: 45%;clear: both;color:gray; font-weight: bold; font-size: 14px;margin-left:10px;"><?php echo $supporter['support_name'];?> :</div><div style=" font-weight: bold;float:left;color:gray;width:50%;font-size: 14px"><?php echo $supporter['phone'];?></div>
											</div>				
												<p style="margin-left: -5px;margin-top: 5px;">
													<a style="margin-left:15px" href="skype:<?php echo $supporter['skype']; ?>?call"><img src="/images/skype_logo.png" style="border: none;" width="55" alt="My status" /></a>
													<a style="margin-left:5px" href="ymsgr:sendim?<?php echo $supporter['yahoo']; ?>"  ><img src="http://opi.yahoo.com/online?u=<?php echo $supporter['yahoo']; ?>&t=2"  width="110" ></a>
												</p>
												
							</div>
							<div  style="clear:both;height:5px"></div>
						<?php }?>
					</div>
		    </div>
		</div>
	<div class="bottom_box"><span></span></div>
		<?php 
	}
	else 
	{
		if($_SESSION['config_template']=='layoutmain_web2')
		{?>
		<link rel="stylesheet" type="text/css" href="/css/web2/sidebar2.css" media="all">
		    <!-- Support online -->
		    <div class="top_box"><span></span></div>
			<div class="box base-mini mini-support">
				<div class="head">
					<h4><?php echo $title;?>
					<?php if(isset($permission) && $permission=="true")  {?>
					<div style="float: right;">
					<ul class="gallery clearfix">
						<a href="/supportonline/clickchange?iframe=true&width=370&height=230" rel="prettyPhoto[iframe]">
							<img src="/images/web1/Pencil.png" style="width:20px ; height:20px;"></img>
						</a>
					</ul>
					</div>
					<div style="float: right;margin-right:5px" >
							<!-- Tạo cây bút chì cho click and change -->
							<ul class="gallery clearfix">
								<a href="/supportonline/add?iframe=true&width=750&height=320" rel="prettyPhoto[iframe]">
									<img src="/images/button_add.png" style="width:20px ; height:20px;"></img>
								</a>
							</ul>
							<!-- End - Tạo cây bút chì cho click and change -->
					</div>
					<?php }?>
					</h4>					
				</div>
				<div class="content">
				<?php foreach ($AllSupporter as $supporter){?>
		        	<div class="support-item">			
		                <div style="width: 100%; font-weight:bold; font-size: 14px; margin-bottom:5px;">
		                	<?php echo $supporter['support_position'];?>
							<?php if(isset($permission) && $permission=="true")  {?>
								<div style="float: right; margin-right: 15px;">
									<!-- nut del -->						
										<input type="button" id="<?php echo $supporter["suppord_id"]?>" onclick="del(<?php echo $supporter["suppord_id"]?>);"  value="" style="background-image: url('/images/button_del.png'); border: none; width: 20px;height: 20px;"/>												
									<!-- end nut del -->
								</div>
								<div style="width: 20px; height:20px; float: right ;margin-right: 3px;">
								<!-- Tạo cây bút chì cho click and change -->
									<ul class="gallery clearfix">
										<a href="/supportonline/clickchangesupporter?sp_id=<?php echo $supporter["suppord_id"]?>&iframe=true&width=750&height=320&abc=<?php echo $supporter["suppord_id"]?>" rel="prettyPhoto[iframe]">
											<img src="/images/Pencil.png" style="width:17px ; height:17px;margin-top:2px"></img>
										</a>
									</ul>
								</div>
											
							<?php  }?>		                	 
		                </div>
		                <div style="width: 100%; height:20px; margin-bottom:5px;">
		                    <div style="float:left; width: 45%; clear: both; font-size: 14px"><?php echo $supporter['support_name'];?>:</div>
		                    <div style="float:left; width:50%; font-size: 14px"><?php echo $supporter['phone'];?></div>
		                </div>	
		                <p style="width:100%; margin-bottom:5px; margin-top:5px;">
		                <a style="margin-left:15px" href="skype:<?php echo $supporter['skype']; ?>?call"><img src="/images/skype_logo.png" style="border: none;" width="55" alt="My status"></a>
		                <a style="margin-left:5px" href="ymsgr:sendim?<?php echo $supporter['yahoo']; ?>"><img src="http://opi.yahoo.com/online?u=<?php echo $supporter['yahoo']; ?>&amp;t=2" width="110"></a>
		                </p>
		            </div>
		         <?php }?>
		        </div>
			</div>
			<div class="bottom_box"><span></span></div>
		    <!-- End Support online -->		
		<?php }
		else 
		{?>
			<div id="support_online">
				<div class="c_navigator" style="margin:0px; padding: 0px; heght:30px;">
					<p class="navi_content"><?php echo $title;?></p>
					<?php if(isset($permission) && $permission=="true")  {?>
					<div style="float: right;margin-right:5px"><!-- Tạo cây bút chì cho click and change -->
						<ul class="gallery clearfix">
							<a href="/supportonline/clickchange?iframe=true&width=370&height=230" rel="prettyPhoto[iframe]">
								<img src="/images/Pencil.png" style="width:20px ; height:20px; margin-top:10px;"></img>
							</a>
						</ul>
									<!-- End - Tạo cây bút chì cho click and change -->
					</div>
					<div style="float: right;margin-right:15px" >
						<!-- Tạo cây bút chì cho click and change -->
						<ul class="gallery clearfix">
							<a href="/supportonline/add?iframe=true&width=750&height=320" rel="prettyPhoto[iframe]">
								<img src="/images/button_add.png" style="width:20px ; height:20px; margin-top:10px;"></img>
							</a>
						</ul>
						<!-- End - Tạo cây bút chì cho click and change --></div>
					<?php  }?>
				</div> <!--end c_navigator-->
				<?php foreach ($AllSupporter as $supporter){?>
				<div class="most_view_content" style="margin-top:0px; padding: 0px">
									
									<div class="box_small_top" style="margin:0px; padding: 0px;height:10px">
									</div>
									<div class="box_small_content" style="height:75px;">
										<div class="support_info">			
											<div style="width: 100%">
												<div style="float: left; width: 150px;font-size: 13px;color:gray">
												<?php echo $supporter['support_position'];?>
												</div>
											<?php if(isset($permission) && $permission=="true")  {?>
											<div style="float: right; margin-right: 15px;">
												<!-- nut del -->						
													<input type="button" id="<?php echo $supporter["suppord_id"]?>" onclick="del(<?php echo $supporter["suppord_id"]?>);"  value="" style="background-image: url('/images/button_del.png'); border: none; width: 20px;height: 20px;"/>												
												<!-- end nut del -->
											</div>
											<div style="width: 20px; height:20px; float: right ;margin-right: 3px;">
				
				
												<!-- Tạo cây bút chì cho click and change -->
												<ul class="gallery clearfix">
													<a href="/supportonline/clickchangesupporter?sp_id=<?php echo $supporter["suppord_id"]?>&iframe=true&width=750&height=320&abc=<?php echo $supporter["suppord_id"]?>" rel="prettyPhoto[iframe]">
													<img src="/images/Pencil.png" style="width:17px ; height:17px;"></img>
											
													</a>
												</ul>
			
											</div>
											<?php  }?>
											
											</div>
											<div style="width: 100%;clear: both;height:20px;">
												<div style="float:left;width: 45%;clear: both;color:gray; font-weight: bold; font-size: 14px"><?php echo $supporter['support_name'];?> :</div><div style=" font-weight: bold;float:left;color:gray;width:50%;font-size: 14px"><?php echo $supporter['phone'];?></div>
											</div>	
												
												<p style="margin-left: -5px;margin-top: 5px;">
													<a style="margin-left:15px" href="skype:<?php echo $supporter['skype']; ?>?call"><img src="/images/skype_logo.png" style="border: none;" width="55" alt="My status" /></a>
													<a style="margin-left:5px" href="ymsgr:sendim?<?php echo $supporter['yahoo']; ?>"  ><img src="http://opi.yahoo.com/online?u=<?php echo $supporter['yahoo']; ?>&t=2"  width="110" ></a>
												</p>
										</div>
														
									</div>
									<div class="box_small_bottom" style="height:10px;background-position: bottom;">
									</div>
			
				</div>
				
				<?php } ?>
			</div><!--end most_viewed_product-->
<?php }
	}
}?>
<div style="clear:both"></div>
<?php if(isset($permission) && $permission=="true")  {?>
<script type="text/javascript">

function del(id)
{ 
	//alert(<?php echo $textConfirm;?>);
	var confirmed=confirm(<?php echo "'".$textConfirm."'";?>);
	if(confirmed==true)
	{
	var sp_id=id;
	
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
		
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange = function()
	{	if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
		window.top.location.reload();
		}
	};
	var url = "/supportonline/clickchange/delete?id="+sp_id;
	//alert(url);
	xmlhttp.open("GET",url,true);	
	xmlhttp.send();
	return false;
	}
}
<?php } ?>
</script>
